
import Home from '../components/home/Home'
import Pcontent from '../components/pcontent/Pcontent'
import Login from '../components/login/Login'
import User from '../components/user/User'
import Shop from '../components/shop/Shop'
import News from '../components/news/News'
import NewsAdd from '../components/news/NewsAdd'
import NewsList from '../components/news/NewsList'
let routes = [
    {
      path: '/',
      component: Home,
      exact: true
    },
    {
      path: '/user',
      component: User
    },
    {
      path: '/shop',
      component: Shop
    },
    {
      path: '/login',
      component: Login
    },
    {
      path: '/pcontent',
      component: Pcontent
    },
    {
      path: '/news',
      component: News,
      routes: [  // 嵌套路由
        {
          path: '/news/',
          component: NewsAdd
        },
        {
          path: '/news/newslist',
          component: NewsList
        }
      ]
    }
  ]

  export default routes